package com.data4.supplier.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.data4.feignapi.dto.PageDTO;
import com.data4.feignapi.dto.ProductDTO;
import com.data4.feignapi.dto.ProductPageDTO;
import com.data4.feignapi.dto.Result;
import com.data4.feignapi.entity.Product;
import com.data4.feignapi.vo.ProductDetailVO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author Forever
 * @since 2024-12-11
 */
public interface ProductService extends IService<Product> {

    @Transactional
    Result addProduct(ProductDTO productDTO, String supplierId);

    Result deleteByIds(List<Integer> productIds, String supplierId);

    Result updateProduct(ProductDTO productDTO, Integer productId);

    Result getProduct(Long current, Long num);

    Result getProductGroup(List<String> group,Integer supplierId);

    ProductPageDTO getProductByNameLike(String productName, Integer current, Integer num,
                                                Integer supplierId);

    Result getProductByMarkerPriceScope(Integer current, Integer num,
                                        Integer little, Integer big,Integer supplierId);

    ProductDetailVO getProductDetail(Integer productId);

    Result getProductSupplier(Long current, Long num, String supplierId);
}
